package cn.cdeden.knowledge.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * @ProjectName : ecm_hou
 * @Package : com.cdyd.ecm.utils.enums
 * @ClassName : FileEnums
 * @Author : Yu.
 * @Description : // 文件来源
 * @Date : 2022/9/28 11:13
 * @Version : 1.0
 */
@Getter
@AllArgsConstructor
public enum FileEnums {

    AVATAR_PATH_FILE("userAvatar","用户头像"),

    PROCESS_FILE("process","流程文件"),
    SYSTEM_SETTINGS("systemSettings","系统设置"),

    PERSONAL_FILE("personal", "个人文档"),
    TEAM_FILE("team", "团队文档"),
    ENTERPRISE_FILE("enterprise", "企业文档"),
    DISTRIBUTE_FILE("distribute", "分发文档"),
    PERSONAL_FORM_DOC_FILE("personalFormDoc", "个人表单文档"),
    TEAM_FORM_DOC_FILE("teamFormDoc", "团队表单文档"),
    ENTERPRISE_FORM_DOC_FILE("enterpriseFormDoc", "企业文档"),
    ENTERPRISE_MATERIAL("enterpriseMaterial","企业素材库"),
    ENTERPRISE_TEMPLATE("template","企业模板"),
    TEAM_TEMPLATE("teamTemplate","团队模板"),
    CONTRACT_FILE("contract","合同文件"),
    CONTRACT_TEMP("contractTemp","合同模板文件"),
    CONTRACT_RELATED_FILE("contractRelatedDoc","合同相关文件"),
    CONTRACT_INVOICE("contractInvoice","合同发票"),
    CONTRACT_LEDGER("contractLedger","合同台账"),

    SUPPLIER_APTITUDE("supplierAptitude","供应商资质"),
    SUPPLIER_DOC("supplierDoc","供应商附件"),
    SUPPLIER_EVENT_DOC("supplierEventDoc","供应商关键事件文件"),

    PATENT_DOC("patentDoc","专利附件"),

    BACKUP_SQL_FILE("backupSql","备份SQL"),

    THIRD_PARTY_FILE("third-party","第三方文件"),

    GPT_FILE("gptfiles","GPT文件"),

    ARTICLE_FILE("article","知乎文章"),

    TEMPORARY_FILE("temporary","临时文件"),

    ARCHIVES_FILE("archives","档案文件"),

    FERRY_FILE("ferry","摆渡文件"),

    AI("ai","AI绘画"),

    TENDER("tender","标书文件"),

    SYSTEM_FILE("systemFile","系统文件"),

    NOTICE_FILE("notice","公告文件"),
    NOTE_FILE("noteFile","笔记文件"),

    SYS_THUMBNAIL("thumbnail","文件缩略图"),

    PROJECT("project","项目文件"),

    GOODS("goods","物品文件"),

    TMS_FILE("tmsFile","TMS文件"),

    FERRY_RECEIVE_FILE("receiveferry","接收摆渡文件"),

    ;

//    private
    private final String code;
    private final String text;


    public static FileEnums find(String code) {
        for (FileEnums value : FileEnums.values()) {
            if (StringUtils.equalsIgnoreCase(code,value.getCode())) {
                return value;
            }
        }
        return null;
    }



}
